package com.itheima.service.impl;

import com.itheima.dao.LoginDao;
import com.itheima.domain.Users;
import com.itheima.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginDao loginDao;
    @Override
    public void save(Users users) {
        loginDao.save(users);
    }

    @Override
    public Users login(String username) {
        Users user = loginDao.login(username);
        return user;
    }
}
